﻿#pragma once
#include<qmap.h>
#include<qstring.h>
#include<qlist.h>
#include"OnlionMusicInfo.h"	
enum class SongKeys :int
{
	SongHash,
	Pay_type,
	SingerName,
	SongName,
	//音乐格式
	Extname,
	Duration_s,
	Url
};

class JsonKeysConfig
{
private:
	QList<QString> m_parents;
	QMap<SongKeys, QString> m_songKeys;
public:
	JsonKeysConfig(
		const QList<QString>& parentKeys,
		const QString& SongHashKey,
		const QString& songNameKey,
		const QString& musicTypeKey,
		const QString& payType,
		const QString& singerNameKey = "",
		const QString& url = ""
	);
	JsonKeysConfig();
	JsonKeysConfig(const QStringList& parentKeys ,const OnlionMusicInfo& info);
	void setSingerName(const QString& singerNameKey);
	const QList<QString>& getParentKeys() const;
	const QMap<SongKeys, QString>& getSongKeys() const;
};

